home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / var / lib / dpkg / info / logrotate.preinst < prev    next >
Text File  |  2009-08-20  |  667b  |  31 lines

  1. #!/bin/sh -e
  2.  
  3. if [ "$1" = "upgrade" ]; then
  4.  
  5.   # Fix up the location of the state files that previous versions used.
  6.  
  7.   if [ -f /var/state/logrotate/status ]; then
  8.     if [ -f /var/lib/logrotate/status ]; then
  9.       rm /var/state/logrotate/status
  10.     else
  11.       mkdir -m 755 -p /var/lib/logrotate
  12.       mv /var/state/logrotate/status /var/lib/logrotate/status
  13.     fi
  14.     rm -rf /var/state/logrotate
  15.   fi
  16.  
  17.   if [ -f /var/lib/logrotate.status ]; then
  18.     if [ -f /var/lib/logrotate/status ]; then
  19.       rm /var/lib/logrotate.status
  20.     else
  21.       mkdir -m 755 -p /var/lib/logrotate
  22.       mv /var/lib/logrotate.status /var/lib/logrotate/status
  23.     fi
  24.   fi
  25.  
  26. fi
  27.  
  28.  
  29.  
  30. exit 0
  31.